﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ComUIControl
{
    public class MessageBoxS
    {
        private static SPMessageBox _wnd;
        public static DialogResult Show(string headInfo, string QuestionInfo)
        {
            _wnd = new SPMessageBox();
            _wnd.SetTip(QuestionInfo);
            _wnd.SetName(headInfo);
            DialogResult res = _wnd.ShowDialog();
            Close();
            return res;
        }

        public static void Close()
        {
            if (_wnd != null)
            {
                _wnd.Dispose();
                _wnd = null;
            }
        }
    }
 
}
